home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
dfue
/
avmnfax
/
rexx
/
efaxview.avm
< prev
next >
Wrap
Text File
|
1995-03-09
|
1KB
|
46 lines
/* efax viewer */
parse arg filename .
base = filename || '.'
do i = 1 to 999
if ~exists(base || right(i, 3, '0')) then break
end
lastPage = i - 1
currentPage = 1
/* extract filename base */
lcolon = lastpos(':', filename)
lslash = lastpos('/', filename)
if lcolon > lslash then last = lcolon
else last = lslash
last = last
faxFileName = right(filename, length(filename) - last)
do forever
address command 'avm:gnu/fax2iff' '-o faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0') base || right(currentPage, 3, '0')
if rc = 0 then do
address command 'avm:avmfaxview faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0') currentPage lastPage
retVal = rc
call delete('faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0'))
if retVal = 1 then do
currentPage = currentPage - 1
if currentPage < 1 then currentPage = 1
end; else if retVal = 2 then do
currentPage = currentPage + 1
end; else if retVal = 0 then do
signal done
end; else do
currentPage = currentPage + 1
end
end; else do
currentPage = currentPage + 1
end
if currentPage > lastPage then signal done
end
done: